IPv6 Tunnel Configuration Example

This section shows examples of manually configured tunnels between brouter ports and VLANs.

Between brouter ports

The following figure shows the tunnel configuration between brouter ports.

Click to expand in new window
Tunnel configuration between brouter ports

You must configure static routes, RIP, or OSPF on both the source (Switch 1) and destination (Switch 2) IPv4 interfaces to communicate on the IPv4 network. You must configure IPv4 addresses on the source and destination.

Configuring Switch 1

Create an IPv6 VLAN and add ports to the VLAN.

vlan create 10 type port-mstprstp 0
vlan mlt 10 4
vlan members 10 1/1 portmember
interface vlan 10
ipv6 interface
ipv6 interface enable
ipv6 interface address 4000:0:0:0:0:0:0:1/64
exit

Create an IPv4 brouter port and enable OSPF on the port.

interface GigabitEthernet 1/30
brouter port 1/30 vlan 1000 subnet 172.21.80.1/255.255.255.0 mac-offset
6

Create the tunnel from the source to the destination.

ipv6 tunnel 1 source 172.21.80.1 address 2500:0000:0000:0000:0000:0000:0000:0001/64 destination 192.168.20.1

Configure a static route on the source.

ipv6 route 4000:0:0:0:0:0:0:2/64 cost 1 tunnel 1

Optionally, you can create an OSPFv3 interface through the tunnel.

router ospf ipv6-enable
router ospf
ipv6 tunnel 1 area 0.0.0.0
ipv6 tunnel 1 enable
exit

Configuring Switch 2

Create an IPv6 VLAN and add ports to the VLAN.

vlan create 40 type port-mstprstp 0
vlan mlt 40 4
vlan members 40 1/2 portmember
interface vlan 40
ipv6 interface
ipv6 interface enable
ipv6 interface address 4000:0:0:0:0:0:0:2/64

exit

Create an IPv4 brouter port and enable OSPF on the port.

interface GigabitEthernet 1/30
brouter port 1/30 vlan 2000 subnet 192.168.20.1/255.255.255.0 mac-offset 6

Create the tunnel from the destination to the source.

ipv6 tunnel 1 source 192.168.20.1 address 2500:0000:0000:0000:0000:0000:0000:0002/64
destination 172.21.80.1

Configure a static route on the destination.

ipv6 route 4000:0:0:0:0:0:0:1/64 cost 1 tunnel 1

Optionally, you can create an OSPFv3 interface through the tunnel.

router ospf ipv6-enable
router ospf
ipv6 tunnel 1 area 0.0.0.0
ipv6 tunnel 1 enable
exit

Between VLANs

The following figure shows the tunnel configuration between VLANs.

Click to expand in new window
Tunnel configuration between VLANs

You must configure static routes, and either RIP or OSPF on both the source (Switch 1) and destination (Switch 2) IPv4 interfaces to communicate on the IPv4 network. You must configure IPv4 addresses on the VLANs.

Configuring Switch 1

Create an IPv6 VLAN and add ports to the VLAN.

vlan create 10 type port-mstprstp 0
vlan mlt 10 4
vlan members 10 1/1 portmember
interface vlan 10
ipv6 interface
ipv6 interface enable
ipv6 interface address 4000:0:0:0:0:0:0:1/64
exit

Create an IPv4 VLAN, add ports to the VLAN, and enable OSPF on the VLAN.

vlan create 20 type port-mstprstp 0
vlan mlt 20 4
vlan members 20 1/30 portmember
interface vlan 20
ip address 172.21.80.1 255.0.0.0  
ip ospf enable 
exit

Create the tunnel from the source to the destination.

ipv6 tunnel
1 source 172.21.80.1 address 2500:0000:0000:0000:0000:0000:0000:0001/64
destination 192.168.20.1

Configuring Switch 2

Create an IPv6 VLAN and add ports to the VLAN.

vlan create 40 type port-mstprstp 0
vlan mlt 40 4
vlan members 40 1/2 portmember
interface vlan 40
ipv6 interface
ipv6 interface enable
ipv6 interface address 4000:0:0:0:0:0:0:2/64
exit

Create an IPv4 VLAN , add ports to the VLAN, and enable OSPF on the VLAN.

vlan create 30 type port-mstprstp 0
vlan mlt 30 4
vlan members 30 1/30 portmember
interface vlan 30
ip address 192.168.20.1 255.0.0.0  
ip ospf enable 
exit

Create the tunnel from the destination to the source.

ipv6 tunnel 1 source 192.168.20.1 address 2500:0000:0000:0000:0000:0000:0000:0002/64
destination 172.21.80.1

Verification

Use the following show command to verify tunnel creation on the source device:

Switch:1(config)#show ipv6 tunnel 1 detail 
================================================================================
                          Tunnel Interface Information
================================================================================
ID         LOCAL ADDRESS   REMOTE ADDRESS  OPER STATUS TYPE
--------------------------------------------------------------------------------
1          172.21.80.1     192.168.20.1    active    manual

1 out of 1 Total number of entries displayed.

--------------------------------------------------------------------------------

================================================================================
                              Address Information
================================================================================
IPV6                                     TYPE    ORIGIN    STATUS
ADDRESS
--------------------------------------------------------------------------------
2500:0:0:0:0:0:0:1                       UNICAST MANUAL    PREFERRED
fe80:0:0:0:0:0:ac15:5001                 UNICAST LINKLAYER PREFERRED


2 out of 2 Total number of entries displayed.

Use the following show command to verify tunnel creation on the destination device:

Switch:1(config)#show ipv6 tunnel 1 detail 
================================================================================
                          Tunnel Interface Information
================================================================================
ID         LOCAL ADDRESS   REMOTE ADDRESS  OPER STATUS TYPE
--------------------------------------------------------------------------------
1          192.168.20.1    172.21.80.1    active    manual

1 out of 1 Total number of entries displayed.

--------------------------------------------------------------------------------

================================================================================
                              Address Information
================================================================================
IPV6                                     TYPE    ORIGIN    STATUS
ADDRESS
--------------------------------------------------------------------------------
2500:0:0:0:0:0:0:2                       UNICAST MANUAL    PREFERRED
fe80:0:0:0:0:0:c0a8:1401                 UNICAST LINKLAYER PREFERRED


2 out of 2 Total number of entries displayed.